<template>
  <div id="name">  

     <el-form ref="form" :model="form" label-width="80px">  
     <el-row> 

        <el-col :span="24" style="display:flex;">
             <div style="height:38px;line-height:38px;"> 
                  <i class="el-icon-back" @click="goBack"></i> 
                </div>
            <el-form-item label="" label-width="0px" style="margin-left:5px;">           
                      <el-date-picker  @change="select_change" :picker-options="pickerOptions"  type="month"  placeholder="开始日期" format="yyyy-MM" value-format="yyyy-MM"  v-model="form.time" style="width:150px;"></el-date-picker>             
            </el-form-item>
             <!-- <div class="custom_button2"  style="margin-left:10px;" @click="search_but()"></div> -->
        </el-col>   
    </el-row> 
   
   </el-form>

   <!-- 渲染数据list -->
   <details-echarts2-list :datalist="datalist" @up_list_fun="list_fun"> </details-echarts2-list>
    
  </div>
</template>

<script>
import DetailsEcharts2List from '@/view/Operationdata/Population/DetailsEcharts2List'
export default {
  name: 'name',
  data () {
    return {    
      pickerOptions: { // 计费日期的约束条件
        disabledDate(time) {
            return time.getTime() < new Date('2021-02').getTime()
            }
      },
        datalist:[],
        form:{
            time:'',
        }
    }
  },
 components:{
    DetailsEcharts2List
  },
  created(){
     this.form.time = this.getNowDate3()
      this.list_fun()
  },
  mounted (){
    
  },
  methods: {
      list_fun(){
        this.post("/whole_detail/appointmentAndBuyDetail", {
             onemonth:this.form.time
	         }).then(res => {
             console.log(res,"fff")
            this.datalist = res.result
            
          })
    }, 
    select_change(){
       this.list_fun()
    },
    goBack() {
        this.$router.go(-1)
     },
  }
}
</script>


<style scoped>

[v-cloak]{
    display: none;
}

</style>
